package com.cskaoyan.exception;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author stone
 * @date 2022/06/08 10:11
 */
@RestControllerAdvice
public class MarketExceptionControllerAdvice {

    @ExceptionHandler(MarketInvalidParameterException.class)
    public BaseRespVo marketInvalidParameterException(MarketInvalidParameterException e) {
        String message = e.getMessage();
        return BaseRespVo.invalidParameter(message);
    }
}
